import { createApp } from './renderer';
import App from './App.vue';
import {
    View,
    Image,
    Text,
    rpxToPx,
    cssValueToEnum,
    TaitankDirection,
    FlexDirection,
    FlexWrapMode,
    FlexAlign,
    CSSDirection,
    Dimension,
    PositionType,
    DisplayType,
    OverflowType,
    NodeType
} from "./base_view.js";

const app = createApp(App);
let view = new View("root");
view.width = window.screen.width;
view.height = window.screen.height;
console.log("screen size: ", view.width, view.height);
view.layoutProps.flexDirection = FlexDirection.Column;
view.layoutProps.wrap = FlexWrapMode.Wrap;
view.layoutProps.justifyContent = FlexAlign.SpaceBetween;
view.backgroundColor = "#f0f0ff"
// console.log("rootView", view);
const rootNode = { type: 'root', children: [], impl: view };
app.mount(rootNode);

// console.log('渲染结果', rootNode)